package hu.u_szeged.inf.ovrt.filelister.core.utils;

import java.io.File;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

/**
 * List for files.
 *
 * @author Homolya András
 *
 */
public class FileList implements List<File> {
    private final List<File> fileListNames;

    /**
     * Constructor.
     *
     */

    public FileList(List<File> fileNames) {        
        fileListNames = fileNames;
    }

    @Override
    public boolean add(File arg0) {
        return fileListNames.add(arg0);
        
    }

    @Override
    public void add(int arg0, File arg1) {
        fileListNames.add(arg0, arg1);
    }

    @Override
    public boolean addAll(Collection<? extends File> arg0) {
        return fileListNames.addAll(arg0);
    }

    @Override
    public boolean addAll(int arg0, Collection<? extends File> arg1) {
        return fileListNames.addAll(arg0, arg1);
    }

    @Override
    public void clear() {
        fileListNames.clear();

    }

    @Override
    public boolean contains(Object arg0) {
        return fileListNames.contains(arg0);
    }

    @Override
    public boolean containsAll(Collection<?> arg0) {
        return fileListNames.containsAll(arg0);
    }

    @Override
    public File get(int arg0) {
        return fileListNames.get(arg0);
    }

    @Override
    public int indexOf(Object arg0) {
        return fileListNames.indexOf(arg0);
    }

    @Override
    public boolean isEmpty() {
        return fileListNames.isEmpty();
    }

    @Override
    public int lastIndexOf(Object arg0) {
        return fileListNames.lastIndexOf(arg0);
    }

    public FileIterator getFileIterator() {
        return new FileIterator(fileListNames.listIterator());
    }

    @Override
    public boolean remove(Object arg0) {
        return fileListNames.remove(arg0);
    }

    @Override
    public File remove(int arg0) {
        return fileListNames.remove(arg0);
    }

    @Override
    public boolean removeAll(Collection<?> arg0) {
        return fileListNames.removeAll(arg0);
    }

    @Override
    public boolean retainAll(Collection<?> arg0) {
        return fileListNames.retainAll(arg0);
    }

    @Override
    public File set(int arg0, File arg1) {
        return fileListNames.set(arg0, arg1);
    }

    @Override
    public int size() {
        return fileListNames.size();
    }

    @Override
    public List<File> subList(int arg0, int arg1) {
        return fileListNames.subList(arg0, arg1);
    }

    @Override
    public Object[] toArray() {
        return fileListNames.toArray();
    }

    @Override
    public <T> T[] toArray(T[] arg0) {
        return fileListNames.toArray(arg0);
    }

    @Override
    public Iterator<File> iterator() {
        return null;
    }

    @Override
    public ListIterator<File> listIterator() {
        return null;
    }

    @Override
    public ListIterator<File> listIterator(int index) {
        return null;
    }

}
